package reno.market.mainmarket.rivenmarket.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "rivenmod", schema = "rivenmarket")
public class RivenModEO {
    private String weaponEn;
    private String weaponCn;
    private Short type;

    @Id
    @Column(name = "weaponEn")
    public String getWeaponEn() {
        return weaponEn;
    }

    public void setWeaponEn(String weaponEn) {
        this.weaponEn = weaponEn;
    }

    @Basic
    @Column(name = "weaponCn")
    public String getWeaponCn() {
        return weaponCn;
    }

    public void setWeaponCn(String weaponCn) {
        this.weaponCn = weaponCn;
    }

    @Basic
    @Column(name = "type")
    public Short getType() {
        return type;
    }

    public void setType(Short type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RivenModEO that = (RivenModEO) o;
        return Objects.equals(weaponEn, that.weaponEn) &&
                Objects.equals(weaponCn, that.weaponCn) &&
                Objects.equals(type, that.type);
    }

    @Override
    public int hashCode() {

        return Objects.hash(weaponEn, weaponCn, type);
    }
}
